<%@ page  import="com.scuthnweb.domain.Account,com.scuthnweb.domain.Share_link" language="java" contentType="text/html; charset=GBK" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html  style="text-align:center;">

<head>
  <link rel="icon" href="favicon.ico" mce_href="favicon.ico" type="image/x-icon"/> 
  <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=0.4, user-scalable=no" />  <!-- 移动端用户不可缩放页面 -->
  <title>华工xx同乡会</title>
  <link rel="stylesheet" type="text/css" href="css/LinkHomePage/style.css" />
  <link rel="stylesheet" type="text/css" href="css/public/public_buttonAndInput.css" />
  <link rel="stylesheet" type="text/css" href="css/public/like_style.css" />
  <script src="js/public/jquery-2.1.4.min.js"></script>
  <script src="js/ActionHomePage/singleActionInfo/singleActionInfoScript.js"></script>
  <script src="js/ActionHomePage/script.js"></script>  
  <script type="text/javascript">
  
  $(document).ready(function(){

		$('body').on("click",'.heart',function(){
			
			var A=$(this).attr("id");
			var B=A.split("like");
			var messageID=B[1];
			var C=parseInt($("#likeCount"+messageID).html());
			$(this).css("background-position","")
			var D=$(this).attr("rel");
		   
			if(D === 'like') {      
				$("#likeCount"+messageID).html(C+1);
				$(this).addClass("heartAnimation").attr("rel","unlike");
			}
			else{
/* 				$("#likeCount"+messageID).html(C+1);
				$(this).addClass("heartAnimation").attr("rel","unlike"); */
				$("#likeCount"+messageID).html(C-1);
				$(this).removeClass("heartAnimation").attr("rel","like");
				$(this).css("background-position","left"); 
			}
		});

	});
  
  window.onresize=function(){
 	 var w=window.innerWidth
      || document.documentElement.clientWidth
      || document.body.clientWidth;
      var _w = parseInt(w);   //获取屏幕宽度
      if(_w>1200){
 		 var v = (_w -1200)/2;
 		 _w = 1200;
 		 $("#wrap").css("width","1200px");
 		 $("#wrap").css("margin-left",(v-8)+"px");
         $("#wrap").css("margin-right",(_w+v-8)+"px");
         
         $(".blackC_t").css("width","1200px");
         $(".blackC_t").css("height","120px");         
         $("#tbar").css("width","1200px"); 
         $("#tbar").css("height","120px"); 
         
      }else{
 		 $("#wrap").css("width","100%");
 		 $("#wrap").css("margin-left",-8+"px");
         //$("#wrap").css("margin-right",-8+"px");
         
         $(".blackC_t").css("width",_w+"px");
         $(".blackC_t").css("height",(_w*0.1)+"px");
         $("#tbar").css("width",_w+"px");
         $("#tbar").css("height",(_w*0.1)+"px");
      }
  }

	  function clickFI($this){
		  var  e = $this.css("right");
		  var _e = parseFloat(e.substring(0,e.length-2));
		  if(_e>=0)
			 $(".floatInfo:hover").css("right","-190px");
		  else
			 $(".floatInfo:hover").css("right","0%");
		  $this.css("transition","right 0.2s");
		  $this.css("-moz-transition","right 0.2s"); /* Firefox 4 */
		  $this.css("-webkit-transition","right 0.2s"); /* Safari and Chrome */
		  $this.css("-o-transition","right 0.2s"); /* Opera */ 
		  console.info("click...");
		  //$this.html($this.css("left"));
	}
  </script>
  	<style type="text/css">
		.inputTxt:focus{
			border-color:rgba(0,255,255,.75);
			box-shadow:0px 0px 6px 2px rgba(0,255,255,.5);
			-moz-box-shadow:0px 0px 6px 2px rgba(0,255,255,.5);
			-webkit-box-shadow:0px 0px 6px 2px rgba(0,255,255,3);
			-o-transition:0px 0px 6px 2px rgba(0,255,255,3);
		}

		.inputTxt{
		   border-color: #00FFFF;
		}
	</style>
</head>

<body style="width:100%;height:100%;background-color:#00CCFF;">
   <div id="wrap" style="width:100%;margin-top:-8px;margin-left:-8px;height:100%;">
   <!--  
	 <div class="floatInfo" onclick="if('commentContent' == document.activeElement.id || 'commentBtn' == document.activeElement.id) {console.info(document.activeElement.id);return;}else clickFI($(this));" onmouseover="ccr($(this));" onmouseout="cc_1($(this));">
		<form>
			<textarea id="commentContent" class="inputTxt" type="text" style="margin-top:60px;width:175px;height:160px;" onfocus="console.info('haha...');" placeholder="你要说些什么...">
			</textarea>
		</form>
		<div id="commentBtn" style="font-family:微软雅黑;" onclick="console.info('btn...');">
			<strong>留言</strong>
		</div>
	 </div>
	 -->
   	 <div class="blackC_t">
	 </div>
     <div id="tbar" class="topbar">
	  <div style="display:inline;">
	     <img style="max-width:8.296%;max-height:80%;vertical-align: middle;width:8.296%;height:80%;" src="image/homepage/u6.png"/>
	  </div>
	  <div style="font-family:微软雅黑;color:#00CCFF;display:inline;">
	     <div style="display:inline;">
		   <span>
	          <strong>华工xx同乡会</strong>
	       </span>
		 </div>
		 <div style="padding-left:18%;display:inline;">
		   <div class="barEl" onmouseover="cc($(this))" onmouseout="ccb($(this))"style="color:#00CCFF;" onclick="window.location = 'pfs?p=homepage/homepage.jsp';">首页</div>&nbsp;&nbsp;&nbsp;
           <div class="barEl" onmouseover="cc($(this))" onmouseout="ccg($(this))"style="color:#CCFF00;" onclick="window.location = 'pfs?p=ActionHomePage/actionHomePage.jsp';">活动中心</div>&nbsp;&nbsp;&nbsp;
           <div class="barEl" onmouseover="cc($(this))" onmouseout="ccr($(this))"style="color:#FF9900;">资讯</div>&nbsp;&nbsp;&nbsp;
           <%
	            String i = (String)session.getAttribute("user_account");
	           	if(i==null)
	           		out.print("<div class=\"barEl\" onmouseover=\"cc($(this))\" onmouseout=\"ccb($(this))\" onclick=\"window.location='pfs?p=login/login.jsp';\">登录</div>&nbsp;&nbsp;&nbsp;"+
	 	                      "<div class=\"barEl\" onmouseover=\"cc($(this))\" onmouseout=\"ccg($(this))\" onclick=\"window.location='pfs?p=register/register.jsp';\" style=\"color:#CCFF00;\">注册</div>&nbsp;&nbsp;&nbsp;");
	           	else
	           		out.print("<div class=\"barEl\" onmouseover=\"cc($(this))\" onmouseout=\"ccb($(this))\" onclick=\"window.location='CheckUserInfo';\" >"+i+"</div>&nbsp;&nbsp;&nbsp;"+
	 	                      "<div class=\"barEl\" onmouseover=\"cc($(this))\" onmouseout=\"ccg($(this))\" onclick=\"window.location='LoginOut';\" style=\"color:#CCFF00;\">退出</div>&nbsp;&nbsp;&nbsp;");	            
	 	    %>
		 </div>
	  </div>
     </div>
     <div id="top" style="background-color:#00CCFF;text-align:left;width:100%;">
       <div>
       </div>
       <div style="padding:10% 0% 10% 0%;color:#FFFFFF;">
         <div style="cursor:pointer;display:inline;padding" onclick="window.location='pfs?p=LinksHomePage/linksHomepage.jsp';">
            <img style="vertical-align:middle;" src="image/ActionHomePage/u70.png"/>
            <span style="font-family:微软雅黑;font-size:1em;">
               <strong>返回资源共享主页</strong>
            </span>
         </div>
         <div style="display:inline;margin-left:30%;">
            <span class="xsbi">
               <strong>资源共享</strong>
            </span>
         </div>
       </div>
     </div>
     <div id="v" style="background-color:#FFFFFF;width:100%;text-align:-webkit-center;">
		<div id="content" >
			<div>
			   <div id="title">
				  <span style="color:#00CCFF;font-family:微软雅黑;font-size:2em;">
					 <strong>
					 	<% Share_link sl = (Share_link)session.getAttribute("linkInfo");
					       out.print(sl.getLink_name());
					    %>
					 </strong>
				  </span>
			   </div>
			   <div>            		   
				  <div style="padding-top:2%;">
					 <span style="color:#00CCFF;">
						<strong>
							发布:<% Account ac = (Account)session.getAttribute("post_user");
								   out.print(ac.getAccount());
								%>
						</strong>
					 </span><br/><br/>
					 <div>
				 		 <div class="heart " id="like1" rel="like" style="display:inline-block;vertical-align:middle;"></div> 
				 		 <div class="likeCount" id="likeCount1" style="display:inline-block;">14</div>
						 <span class="xbi" style="color:#00CCFF;font-family:微软雅黑;padding-left: 2%;">
						 	关注该资源
					 	 </span>
					 </div>
				  </div>
			   </div>
			</div><br/><br/><br/>
			<table width="80%" style="text-align:center;margin-left:5%;">
			  <tr>
				<th style="vertical-align:top;">			
					<div style="display:inline-block;font-family:华文楷体;vertical-align:middle;">
						<img style="width:80px;height:80px;box-shadow:0px 0px 8px 0px;" src="<% String url = (String)session.getAttribute("image_url");out.print(url);%>">
						<div>
							<span>
								<% out.print(ac.getAccount());%>
							</span><br/>
							<span>已认证</span>
						</div>
					</div>
				</th>
				<th style="padding-left: 2%;">		
					<div style="text-align:left;">
						<span>
							<%
								out.print(sl.getLink());

							 %>
						</span>
					</div><br/><br/><br/><br/><br/><br/><!-- <hr style="margin-top:-1px;border:3px solid #00CCFF;width:80%;"/> --><br/><br/><br/><br/>
				</th>
			  </tr>

			</table>
			<!--  
			<div class="tagBtn" style="font-family:微软雅黑;" onmousemove="cbcb($(this));cc($(this));" onmouseout="cbc($(this));ccb($(this));">
				下一页
			</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			-->
			<%
				Integer uid = (Integer)session.getAttribute("user_id");
				if(uid!=null&&uid.intValue()==ac.getId().intValue()){
					out.print("<div class=\"tagBtn\" style=\"font-family:微软雅黑;\" onclick=\"window.location='CheckUserResLinkForModify?sid="+sl.getId()+"';\" onmousemove=\"cbcb($(this));cc($(this));\" onmouseout=\"cbc($(this));ccb($(this));\">"+
							  "修改资源" + "</div>&nbsp;&nbsp;&nbsp;");
					out.print("<div class=\"tagBtn\" style=\"font-family:微软雅黑;\" onclick=\"window.location='DeleteResLink?sid="+sl.getId()+"';\" onmousemove=\"cbcb($(this));cc($(this));\" onmouseout=\"cbc($(this));ccb($(this));\">"+
							  "删除资源" + "</div><br/><br/>");					
				}else{
					Boolean adminDeletable = (Boolean)session.getAttribute("adminDeletable");
					if(adminDeletable)
						out.print("<div class=\"tagBtn\" style=\"font-family:微软雅黑;\" onclick=\"window.location='';\" onmousemove=\"cbcb($(this));cc($(this));\" onmouseout=\"cbc($(this));ccb($(this));\">"+
								  "管理员删除资源" + "</div><br/><br/>");
				}
				session.removeAttribute("adminDeletable");		 		
				session.removeAttribute("linkInfo");
		 		session.removeAttribute("post_user");
		 		session.removeAttribute("image_url");				
			 %>

		</div><br/><br/>
     </div>
     <div id="foot" style="font-family:微软雅黑;border-radius:6px;margin-top:-5%;box-shadow: 0px 0px 18px 0px;width:100%;height:30%;background-color:#CCCCCC;left:0px;bottom:0px;">   
       <div style="font-family:微软雅黑;margin-top:5%;">  
	     <div>
	        <a target="_blank" href="#"><span class="si">联系我们</span></a>
	     </div><br/>
	     <div style="font-family:微软雅黑;display:inline;">
		      <div class="barEl" onmouseover="cc($(this))" onmouseout="ccB($(this))"><span class="si">首页</span></div>&nbsp;&nbsp;&nbsp;
              <div class="barEl" onmouseover="cc($(this))" onmouseout="ccB($(this))"><span class="si">活动</span></div>&nbsp;&nbsp;&nbsp;
              <div class="barEl" onmouseover="cc($(this))" onmouseout="ccB($(this))"><span class="si">资讯</span></div>&nbsp;&nbsp;&nbsp;
              <div class="barEl" onmouseover="cc($(this))" onmouseout="ccB($(this))"><span class="si" onclick="window.location = 'pfs?p=AdminManage/AdminManage.jsp';">管理员中心</span></div>&nbsp;&nbsp;&nbsp;
	     </div><br/>
	     <div>
	          <a target="_blank" href="http://www.scut.edu.cn/"><span style="color:#999999;" class="xsi">友情链接:华南理工大学官网</span></a>
	     </div><br/>
	     <div>
	        <span class="xsi">备案信息:xxxxxxxxxxxxxxxxxxxxxx</span>
	     </div>
	   </div>
     </div>
   </div>   
</body>

<script type="text/javascript">
	 var w=window.innerWidth
     || document.documentElement.clientWidth
     || document.body.clientWidth;
     var _w = parseInt(w);   //获取屏幕宽度
     
	 if(_w>1200){
		 var v = (_w -1200)/2;
		 _w = 1200;
		 $("#wrap").css("width","1200px");
		 $("#wrap").css("margin-left",(v-8)+"px");
         $("#wrap").css("margin-right",(_w+v-8)+"px");
         $(".blackC_t").css("width","1200px");
         $(".blackC_t").css("height",_w*0.1);
         $("#tbar").css("width","1200px"); 
         $("#tbar").css("height",_w*0.1);
	 }else{
		 $("#wrap").css("width","100%");
		 $("#wrap").css("margin-left",-8+"px");
         //$("#wrap").css("margin-right",_w+"px");
         
         $(".blackC_t").css("width",_w+"px");
         $(".blackC_t").css("height",_w*0.1);
         $("#tbar").css("width",_w+"px");  
         $(".blackC_t").css("height",_w*0.1);
	 }
</script>
</html>